﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;

namespace Syncfusion.Lib.Controls.Attach
{
    /// <summary>
    /// SfDataGrid附加属性
    /// </summary>
    public class SfDataGridAttach
    {

        #region 关联控件名称 - 依赖属性
        /// <summary>
        /// 关联控件名称 - 获取依赖属性
        /// </summary>                
        public static string? GetRelationSfDataGridName(DependencyObject obj)
        {
            return (string?)obj.GetValue(RelationSfDataGridNameProperty);
        }

        /// <summary>
        /// 关联控件名称 - 设置依赖属性
        /// </summary>  
        public static void SetRelationSfDataGridName(DependencyObject obj, string? value)
        {
            obj.SetValue(RelationSfDataGridNameProperty, value);
        }

        /// <summary>
        /// 关联控件名称 - 注册依赖属性 
        /// <para>使用DependencyProperty作为MyProperty的后台存储。这支持动画、样式、绑定等。</para>
        /// </summary>
        public static readonly DependencyProperty RelationSfDataGridNameProperty =
            DependencyProperty.RegisterAttached("RelationSfDataGridName", typeof(string), typeof(SfDataGridAttach), new PropertyMetadata(""));

        #endregion 关联控件名称 - 依赖属性
    }
}
